<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数组合并与切片</title>
    <script src="../../src/array/concat.js"></script>
    <script src="../../src/array/slice.js"></script>
</head>
<body>
    <script>
        //数组合并
        // let arr = [1,2,3];
        // const result = arr.concat([4,5,6], 7,8);
        // console.log(result);
        // const result = concat(arr, [4,5,6], 7, 8, [9,10]);

        //数组切片
        let arr = [1,3,5,7,9,15];
        // let result = arr.slice(1, 5);
        // console.log(result);

        // const result = slice(arr, 1, 5);
        const result = slice(arr);
        console.log(result);

    </script>
</body>
</html>